<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" id="btn" value="点我">
<script>
    var btn = document.getElementById('btn');
    btn.onclick= function(e){
        console.log(e);
    }
</script>
</body>
</html>